package bavaria.hightech.banking.gui;

import javax.swing.JLabel;
import javax.swing.JPanel;

import bavaria.hightech.banking.bank.BankImpl;

/**
 * This Class is just a wrapper for some objects with getter/setter. A reference
 * to an instance of this class is used for delegating.
 * 
 * @author Dietmar
 */
public class GlobalVarsContainer {

	private final BankImpl bank;
	private Integer selAccNr = new Integer(-1);
	private final JPanel contentWrapper;
	private JLabel statusLabel = new JLabel("iBank initialized");

	/**
	 * The BankImpl instance and the contentWrapper is set in the constructor so
	 * that no setter is needed.
	 * 
	 * @param bank
	 *            BankImpl instance
	 * @param static JPanel contentWrapper that contains the dynamic Wrappers
	 */
	public GlobalVarsContainer(BankImpl bank, JPanel contentWrapper) {
		this.bank = bank;
		this.contentWrapper = contentWrapper;
	}

	public BankImpl getBank() {
		return bank;
	}

	public Integer getSelAccNr() {
		return selAccNr;
	}

	public JPanel getContentWrapper() {
		return contentWrapper;
	}

	public void setSelAccNr(Integer selAccNr) {
		this.selAccNr = selAccNr;
	}

	public void setStatusLabel(String s) {
		statusLabel.setText(s);
	}

	public JLabel getStatusLabel() {
		return statusLabel;
	}

}
